scroll

Key Blog

  • Key Homepage>
  • Blog>
  • [ue5] how to set up git version control for unreal engine 5 (ue5) with ue git plugin
  • [UE5] How to Set Up Git Version Control for Unreal Engine 5 (UE5) with UE Git Plugin

    @kiikey4(Key Zhao)

    [UE5] How to Set Up Git Version Control for Unreal Engine 5 (UE5) with UE Git Plugin

    Last updated on Feb 03, 2025

    Posted on Feb 02, 2025

    0

    Overview

    In this article, I'll explain why version control is essential for Unreal Engine 5 (UE5) projects, the benefits of using version control, and why the UE Git Plugin is a better choice than standard Git. I'll also provide a step-by-step guide on setting up version control in a UE5 project using the UEGitPlugin (Git LFS 2), with more detailed instructions than the official installation guide.

    Environment

    • Unreal Engine 5.4
    • Git 2.44.0
    • UEGitPlugin 3.16
    • Windows 11 Pro

    Why you should use version control with Unreal Engine 5?

    Version control is essential for game development, and when working with UE5, having a solid version control system can save you from many headaches. Whether you are a solo developer or part of a team, version control ensures that your work is backed, organized and easily recoverable.

    Here is the benefits of using version control in UE5.

    1. Project Backup and Recovery

    Game projects are complex, and losing progress due to accidental deletions, crashes, or file corruption can be devastating. Version control allows you to revert to previous versions of your project, ensuring that you never lose important work.

    1. Collaboration and Team Workflow

    For teams, version control makes collaboration seamless. Multiple developers can work on different features simultaneously without overwriting each other's work. Branching and merging help integrate changes smoothly while maintaining project stability.

    1. Experimentation Without Risk

    Want to try a new gameplay mechanic but afraid it might break your project? With version control, you can create a separate branch, test your idea, and merge it only if it works as intended. This flexibility encourages experimentation and innovation.

    1. Tracking Changes and Debugging

    Version control keeps a history of all changes made to the project. If a bug is introduced, you can easily track when and where it happened by checking previous commits. This makes debugging much easier compared to working without version control.

    Why Use the UE Git Plugin Instead of Standard Git?

    Better Handling of Binary Files

    Unreal Engine projects contain many binary files (.uasset, .umap) that are not easily diffable like text-based source code. Standard Git struggles with large binary files, whereas the UE Git Plugin supports these files with features like file locking (Check Out), similar to Perforce, Plastic SCM, and SVN.

    this video (27:55 - 32:47) explains why standard git is ideal for UE projects:

    Video: Ari Arnbjörnsson (Housemarque): Lessons Learned from a Year of UE4 AAA Development

    My Suggestion of Choosing Version Control Tool

    Team ScaleRecommended Version Control Tool
    Solo DeveloperGit with UE Git Plugin or Standard Git with LFS
    Team (2-5 members)Git with UE Git Plugin / Plastic SCM / Subversion
    Team (6+ members)Consider using Perforce (but expensive)

    How to Install and Set up the UE Git Plugin

    Follow these steps to install and enable the UE Git plugin in UE5.

    The plugin requires compiling from Visual Studio (or Rider), so you must have at least one C++ file in your project

    Step 1: Install Git

    Ensure you have Git installed on your system. If not, download and install it from git-scm.com.

    During installation, make sure Git LFS and Git Credential Manager are checked.

    GitLFS_lbbqll

    GitCredentialManager_as16js

    Step 2: Git Authentication

    launch git bash.

    LaunchGitBash_ghtibz

    Configure your GitHub account:

    1git config --global user.name "yourUserName" 2git config --global user.email yourEmail

    Step 3: Set Up a Git Repository

    To set up a Git repository, you may need a Git GUI client such as GitHub Desktop, Fork, or Sourcetree. Alternatively, you can use the command line.

    In this example, we'll use Fork. Open Fork and navigate to File -> Init New Repository....

    InitRepo_gmhykp

    Then, select your project root.

    Next, go to GitHub, click the + button in the top right, and select New repository.

    NewRepoButton_kkflyn

    Enter a repository name, choose either Public or Private, and click Create repository.

    CreateRepositoryDetail_eirzom

    Ensure that HTTPS is selected, then click the copy button to copy the repository URL.

    CopyGit_pvdv6z

    Return to Fork, right-click Remotes -> Add New Remote....

    AddRemote_kjglsr

    Paste the copied URL into Repository URL, then click Add New Remote.

    Step 4: Download UEGitPlugin

    Go to Unreal Engine Git Plugin and download the ZIP file.

    DownloadUEGitPlugin_ovtkkw

    Install to Project

    Unzip the plugin into project/Plugins/Developer. If the Plugins or Developer folder doesn't exist, create them.

    After unzipping, you'll see two UEGitPlugin-3.16 folder, keep only one. So copy the UEGitPlugin-3.16 folder to Developer folder (Remove duplicated UEGitPlugin-3.16 folder).

    Your folder structure should look like this:

    ProjectStructure_zp1j3e

    Or you can Install it to Engine

    Unzip into Engine/Plugins/Developer folder.

    Then rename Engine/Plugins/Developer/GitSourceControl.uplugin to Engine/Plugins/Developer/GitSourceControl.uplugin.disabled

    Step 5: Setup .gitattributes and .gitignore

    In your project root folder:

    1. Create a .gitattributes file and copy the content from .gitattributes.
    2. Create a .gitignore file and copy the content from .gitignore.

    Step 6: Compile the plugin

    Open your project .sln file in Visual Studio or Rider, then build the project.

    Step 7: Set Up UE Revision Control

    1. Open UE5, go to the plugins menu (Edit->Plugins), and enable Git LFS 2. GitLFS2_tbzxnj
    2. Click Revision Control at the bottom right. RevisionControl_cdgfcd
    3. Click Connect to Revision Control...
    4. Select provider to Git LFS 2 SelectGitLFS2_eckell
    5. Make sure Git Path is set to git.exe, check Uses Git LFS, and enter your GitHub username (it should match the one displayed under "UserName"). RevisionControlLogin_nfm1t6
    6. Click Accept Settings.

    Step 8: Plugin Configuration

    Edit Config/DefaultEditorPerProjectUserSettings.ini, paste the content below.

    DefaultEditorPerProjectUserSettings.ini
    1[/Script/UnrealEd.EditorLoadingSavingSettings] 2bSCCAutoAddNewFiles=False 3bAutomaticallyCheckoutOnAssetModification=False 4bPromptForCheckoutOnAssetModification=True 5 6[/Script/UnrealEd.EditorPerProjectUserSettings] 7bAutoloadCheckedOutPackages=True

    Done!

    Usage

    Pull, Push, Commit in UE5

    GitAction_upuqxj

    Check File History

    FileHistory_fcde2h

    Check Out (Lock) File

    When you edit and save a file, it will be checked out (red tick).

    You can also manually check out files: Right-click → Revision Control → Check Out

    CheckOut_rbhdjf

    LocalCheckedOut_j6dmus

    Other users cannot modify locked files until you commit & push or revert the changes.

    Plugin GitHub Page

    For more information, visit the official plugin page. Unreal Engine Git Plugin

    Special Thanks

    Thanks to @aizen76 (alwei) and @toshiyuki_wada (ぽちお) for introducing me to the plugin.

    Also, thanks author of the plugin mastercoms for helping me solve installation issues.


    Feel free to leave a comment if you have any questions.

    References

    0

    Comments

    No comments

    Let's comment your feeling